-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
subcommunities: add invitation request #1067
base: master
Are you sure you want to change the base?
Conversation
bf7c379
to
784aeb6
Compare
193ddc6
to
22eea5a
Compare
return current_community_records_service.search( | ||
system_identity, community_id=community_id | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
major/shelve: this method only returns the first 25 results from the record search, so the code below doesn't "bulk add" all the records of the community.
This actually is a bug even in our subcommunity inclusion request logic above, which means that when we accept subcommunity requests, this doesn't add ALL the records of the community to the parent community.
It's relatively low impact though, since most communities don't have that many records (or probably have no records at all, since they've just being created). For the new request type though, this will not be the case, so this has to be fixed relatively quick.
NAME = "TODO" | ||
ACRONYMS = "TODO" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor/shelve: these will probably be part of the data/payload of the request, so we can easily pass them as parameters when bulk creating the requests.
move submit_join_as_subcommunity_request to communities services
"cancel": actions.CancelAction, | ||
# Custom implemented actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean by "custom implemented actions"? custom = only present in zenodo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Custom meaning that they aren't using the default actions.Action
. Comment was added to match invenio-communities
https://github.com/inveniosoftware/invenio-communities/blob/master/invenio_communities/subcommunities/services/request.py#L70
expires_at = self.request.expires_at.strftime("%B %d, %Y") | ||
NAME = "TODO" | ||
ACRONYMS = "TODO" | ||
self.request["description"] = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be in a template?
child = self.request.receiver.resolve().id | ||
parent = self.request.created_by.resolve().id | ||
|
||
_add_community_records(child, parent, uow) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it mean you add records to parent community when invitation expires? Since I don't know the requirements it seems a bit counter intuitive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, by default they will be included if the request expires. The thinking is that this is mutually beneficial and the request would only be declined if there has been a mistake
Close #1061
Tests failing because of import errors